package com.demo.proxy;
/**
 * 火车票销售代理类
 */
public class TicketImplProxy implements Ticket {
	
	private TicketImpl ticketImpl;	//目标类
	
	public TicketImplProxy(TicketImpl ticketImpl) {
		this.ticketImpl = ticketImpl;
	}

	@Override
	public void ticket() {
		System.out.println("售票前验证顾客的身份信息…………");
		ticketImpl.ticket();
		System.out.println("售票后收取顾客的手续费…………");
	}

}